const Mock = require('mockjs');

const data = Mock.mock({
  code: 200,
  "data|10": [{
    "id": "@id",
    "image": "@image(120x80, @color)",
    "title": "@ctitle",
    "price|20-100": 1,
    "city": "@city"
  }]
})
module.exports = app => {
  app.get('/api/list', (req, res) => res.send(data))
}


/**
 * CommonJS      nodejs
 * require
 * module.exports
 * 
 * ES Module     浏览器
 * import 
 * export default 
 * */ 